package com.googlecode.jcaffe.control.modules.mainwindow;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import com.googlecode.jcaffe.control.modules.settingswindow.SettingsWindow;

final class MainWindowController implements ActionListener {
	private MainWindowView view;
	@SuppressWarnings("unused")
	private MainWindowModel model;

	public MainWindowController(MainWindowView view, MainWindowModel model) {
		this.view = view;
		this.model = model;

		view.setEventListener(this);
	}

	@Override
	public void actionPerformed(ActionEvent event) {
		String actionCommand = event.getActionCommand();

		if (actionCommand.equals("settings")) {
			SettingsWindow settings = new SettingsWindow();
			settings.showWindow(true);
		}
		else if (actionCommand.equals("exit")) {
			view.dispose();
		}
	}
}
